<?php

class index_controller{
    function index(){
        header('Content-Type: text/html');
        $rootDir = $_SERVER["DOCUMENT_ROOT"];
        $filename = $rootDir . "/web/dist/index.html";
        if (file_exists($filename)) {
            $file = file_get_contents($filename);
            echo $file;
        } else {
            echo Json::Fail();
        }
    }
}